RPM_ROOT=/usr/src/redhat/
RPM_SOURCE_ROOT=$(RPM_ROOT)/SOURCES
RPM_SPEC_ROOT=$(RPM_ROOT)/SPECS
RPMBUILD_OPT=-bb --clean --rmspec --rmsource

all: scws \
	 scws_dict \
	 cscwsd

scws:
	cp -f scws-1.0.0.tar.gz $(RPM_SOURCE_ROOT)/  ;\
	cp -f scws.spec $(RPM_SPEC_ROOT) ;\
	rpmbuild $(RPMBUILD_OPT) $(RPM_SPEC_ROOT)/scws.spec

scws_dict:
	cp -f scws-1.0.0.tar.gz $(RPM_SOURCE_ROOT)/scws_dict-1.0.0.tar.gz  ;\
	cp -f scws_dict.spec $(RPM_SPEC_ROOT) ;\
	rpmbuild $(RPMBUILD_OPT) $(RPM_SPEC_ROOT)/scws_dict.spec
cscwsd:
	cp -f cscwsd-0.0.3.tgz $(RPM_SOURCE_ROOT)/ ;\
	cp -f cscwsd.spec $(RPM_SPEC_ROOT) ;\
	rpmbuild $(RPMBUILD_OPT) $(RPM_SPEC_ROOT)/cscwsd.spec
